Web applications are typically written in a combination of several programming languages, such as JavaScript on the client side, and PHP Hypertext Preprocessor (“PHP”) with embedded Structured Query Language (“SQL”) commands on the server side. Such applications generate structured output in the form of dynamically generated Hyper Text Markup Language (“HTML”) pages that may refer to additional scripts to be executed. As with any program, programmers make mistakes and introduce faults, resulting in Web-application crashes and malformed dynamically generated HTML pages. While malformed HTML errors may seem trivial, and indeed many of them are at worst minor annoyances, they have on occasion been known to enable serious attacks such as denial of service.